package com.wind.taobao.api.trade.product.rest
{
	import com.wind.taobao.api.trade.product.convert.ProductConvert;
	import com.wind.taobao.core.webservice.TaobaoListResponse;
	import com.wind.taobao.core.webservice.TaobaoResponse;

	import mx.collections.ArrayCollection;

	/**
	 * taobao.products.get Response
	 * @author fxy
	 *
	 */
	public class ProductsGetResponse extends TaobaoListResponse
	{
		public var products:ArrayCollection;

		public function ProductsGetResponse(response:TaobaoResponse=null)
		{
			super(response);
			initProducts();
		}

		private function initProducts():void
		{
			if (body != null && this.isSuccess)
			{
				if (body["rsp"].hasOwnProperty("products"))
					products=ProductConvert.convertProducts(body["rsp"]["products"]);
			}
		}
	}
}